define([
  'backbone',
  'utils/Conf',
  'models/Familiar',
  'collections/Collection'
], function(Backbone, Conf, Familiar, Collection){
  var Familiars = Collection.extend({
    model: Familiar,
    url: function() {
      var urlBase = Conf.routes.familiars.list;
      if(this.internal) {
        urlBase += "/" + this.internal.id + Conf.routes.internals.familiars;
      }
      console.log("URL de Familiars: " + urlBase);
      return urlBase;
    },

    initialize: function(models, options) {
      options || (options = {});
      Collection.prototype.initialize.call(this, models, options);
      if(options.internal) {
        this.internal = options.internal;
      }
    }
  });

  return Familiars;
});